import { FC, memo, useContext } from "react"
import { useWeekData } from "../../helpers/center"
import Echarts from "@/components/Echarts"
import Title from "../../components/Title"
import { EchartsThemeContext } from "@/context/echartsTheme"

const CenterCardTwo: FC = memo(() => {
  const [weekOption] = useWeekData()
  const { theme } = useContext(EchartsThemeContext)

  return (
    <div className="flex-1 mt-17px mb-15px bg-[#fff] rounded-4px flex flex-col">
      <Title name="数据采集趋势" isUnit={false} />
      
      <div className="flex-1">
        <Echarts theme={theme} option={weekOption} />
      </div>
    </div>
  )
})

export default CenterCardTwo